<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="edge" />
<!-- [jQuery] -->
<script type="text/javascript" src="static/jquery-easyui-1.5.1/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/static/js/jquery-1.10.1.min.js"></script>
<!-- [EasyUI] -->
<link id="easyuiTheme" rel="stylesheet" type="text/css" href="static/jquery-easyui-1.5.1/themes/gray/easyui.css" />
<link id="easyuiTheme" rel="stylesheet" type="text/css" href="static/jquery-easyui-1.5.1/themes/icon.css" />
<script type="text/javascript" src="static/jquery-easyui-1.5.1/jquery.easyui.min.js" charset="utf-8"></script>
<script type="text/javascript" src="static/jquery-easyui-1.5.1/locale/easyui-lang-zh_CN.js" charset="utf-8"></script>
<!-- [扩展JS] -->
<script type="text/javascript" src="static/js/extJs.js" charset="utf-8"></script>

<!-- [扩展样式] -->
<link rel="stylesheet" type="text/css" href="static/css/icommon.css" />
<link rel="stylesheet" type="text/css" href="static/css/dreamlu.css" />

<title>MTD后台管理系统</title>
<script type="text/javascript">
        var index_layout;
        var index_tabs;

        $(function () {
            index_layout = $('#index_layout').layout({
                fit: true
            });
            index_tabs = $('#index_tabs').tabs({
                fit: true,
                border: false,
                tools: [{
                    iconCls: 'icon-home',
                    handler: function () {
                        index_tabs.tabs('select', 0);
                    }
                }, {
                    iconCls: 'icon-del',
                    handler: function () {
                        var index = index_tabs.tabs('getTabIndex', index_tabs.tabs('getSelected'));
                        var tab = index_tabs.tabs('getTab', index);
                        if (tab.panel('options').closable) {
                            index_tabs.tabs('close', index);
                        }
                    }
                }]
            });
        });


        function addTab(title, href, icon) {
            var tt = $('#index_tabs');
            icon = icon || 'menu_icon_service';
            if (tt.tabs('exists', title)) {
                tt.tabs('select', title);
                var currTab = tt.tabs('getTab', title);
                tt.tabs('update', {tab: currTab, options: {content: content, closable: true}});
            } else {
                if (href) {
                    var content = '<iframe frameborder="0" src="' + href + '" style="border:0;width:100%;height:99.5%;"></iframe>';
                } else {
                    var content = '未实现';
                }
                tt.tabs('add', {
                    title: title,
                    content: content,
                    closable: true,
                    iconCls: icon
                });
            }
        }

        function logout() {
            $.messager.confirm('提示', '确定要退出?', function (r) {
                if (r) {
                    progressLoad();
                    $.post('/logout', function (result) {
                        if (result.code=='0') {
                            progressClose();
                            window.location.href = '/login';
                        }
                    }, 'json');
                }
            });
        }
    </script>
</head>
<body>
<div id="loading"
     style="position: fixed;top: -50%;left: -50%;width: 200%;height: 200%;background: #fff;z-index: 100;overflow: hidden;"> <img src="static/img/ajax-loader.gif"
         style="position: absolute;top: 0;left: 0;right: 0;bottom: 0;margin: auto;"/> </div>
<div id="index_layout">
  <div data-options="region:'north',border:false" style=" overflow: hidden; ">
    <div> <span style="float: right; padding-right: 20px; margin-top: 15px; color: #333">您好
      <b>{{user_name}}</b>&nbsp;&nbsp;
      <a href="javascript:void(0)" onClick="logout()" class="easyui-linkbutton" plain="true" icon="icon-clear">安全退出</a>
    </span>
    <span class="header"></span>
    </div>
  </div>
  <div data-options="region:'west',split:true" title="菜单"
         style="width: 160px; overflow: hidden;overflow-y:auto; padding:0px">
    <div class="easyui-accordion  i_accordion_menu" fit="true" border="false">
      {%for menu in menu_list%}
      <div title="{{menu.menu_name}}" selected="true"  style="overflow: auto;color: black">
        {%for link in menu.link_list%}
        <div class="nav-item"> <a href="javascript:addTab('{{link.link_name}}','{{link.link}}','menu_icon_datadeal')"> <span class="menu_icon_datadeal"></span> <span>{{link.link_name}}</span> </a> </div>
        {% endfor %}
      </div>
      {% endfor %}

    </div>


  </div>
  <div data-options="region:'center'" style="overflow: hidden;">
    <div id="index_tabs" style="overflow: hidden;">
      <div title="首页" data-options="border:false" style="overflow: hidden;">
         asdfgsdfg
      </div>
    </div>
  </div>
  <div data-options="region:'south',border:false"
         style="height: 30px;line-height:30px; overflow: hidden;text-align: center;background-color: #eee">Copyright ©
    2017 power by <a href="http://www.baidu.com/" target="_blank">MTD</a></div>
</div>
<!--[if lte IE 7]>
<div id="ie6-warning"><p>您正在使用 低版本浏览器，在本页面可能会导致部分功能无法使用。建议您升级到 <a
        href="http://www.microsoft.com/china/windows/internet-explorer/" target="_blank">Internet Explorer 8</a> 或以下浏览器：
    <a href="http://www.mozillaonline.com/" target="_blank">Firefox</a> / <a
            href="http://www.google.com/chrome/?hl=zh-CN" target="_blank">Chrome</a> / <a
            href="http://www.apple.com.cn/safari/" target="_blank">Safari</a> / <a href="http://www.operachina.com/"
                                                                                   target="_blank">Opera</a></p></div>
<![endif]-->
<style>
    /*ie6提示*/
    #ie6-warning {
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
        background: #fae692;
        padding: 5px 0;
        font-size: 12px
    }

    #ie6-warning p {
        width: 960px;
        margin: 0 auto;
    }
</style>
</body>
</html>
